package com.uwlaser.service.dto;


import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import java.util.ArrayList;
import java.util.List;

/**
 * 添加产品唯一编码结果-多个
 */
@Data
public class AddProductSnBatchResult {

    @ApiModelProperty("产品序列号列表")
    private List<ProductSn> productSns;

    @ApiModelProperty("产品类型")
    private String productType;

    @ApiModelProperty("产品型号")
    private String productCode;

    @ApiModelProperty("产品名称")
    private String productName;

    //添加产品信息
    public void addProductSn(String productSn, String messag, Integer status){
        if(this.productSns == null){
            this.productSns = new ArrayList<>();
        }
        this.productSns.add(new ProductSn(productSn,messag,status));
    }

    @Data
   public class ProductSn {

        @ApiModelProperty("状态")
        private Integer status;

        @ApiModelProperty("消息")
        private String  messag;

        @ApiModelProperty("产品序列号")
        private String productSn;

        public ProductSn(String productSn, String messag, Integer status) {
            this.status = status;
            this.messag = messag;
            this.productSn = productSn;
        }
    }

}
